package com.local.order.mapper;

import com.local.order.pojo.OrderItem;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface OrderItemMapper {

    /**
     * 通过 orderId 查询订单商品明细
     * @param orderId
     * @return
     */
    public List<OrderItem> selectByOrderId(Integer orderId);


    /**
     * 通过 orderItemId 查询数据
     * @param orderItemId
     * @return
     */
    public OrderItem selectById(Integer orderItemId);


    /**
     * 批量插入数据
     * @param orderItemList
     * @return
     */
    public Integer saveByList(List<OrderItem> orderItemList);
}
